﻿using Microsoft.EntityFrameworkCore;
using System;
using System.Collections.Generic;
using System.Text;

namespace HelloOne.Repositories.EF
{
    public class EFRepositoryProvider : IRepositoryProvider
    {
        public EFRepositoryProvider()
        {
        }

        public EFRepositoryProvider(DbContext db)
        {
            this.db = db;
        }

        public IRepository<T> Create<T>() where T : class, IEntity
        {
            return new Repository<T>(this.db);
        }

        private DbContext db;
    }
}